#pragma once

#include <QtWidgets/QDialog>
#include "ui_ZxPokerRange.h"
#include <QRect>

class ZxPokerRange : public QDialog
{
    Q_OBJECT

public:
    ZxPokerRange(QWidget *parent = Q_NULLPTR);

protected:
    void paintEvent(QPaintEvent* pe) override;
    void resizeEvent(QResizeEvent* r) override;
    void mouseReleaseEvent(QMouseEvent* m) override;
    void mousePressEvent(QMouseEvent* m) override;
    void mouseMoveEvent(QMouseEvent* m) override;
private:
    void CalculateGrids();
    void TotalHands();
    void SingleSelection(QPoint p);

public Q_SLOTS:
    void OnClearCardSelection();
private:
    Ui::ZxPokerRangeClass ui;

    int m_sel;
    QRect m_cards;
    QSize m_cardsz;
    QVector<float> m_xaxis;
    QVector<float> m_yaxis;
    QList<QPoint> m_selected;
    bool m_mousepressed;
    bool m_mousemove;
    QPoint m_dragstart;
    QPoint m_dragend;
};
